Integrand size = 22, antiderivative size = 94 \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {d (2 b c-a d) x^{1+m}}{b^2 (1+m)}+\frac {d^2 x^{3+m}}{b (3+m)}+\frac {(b c-a d)^2 x^{1+m} \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{2},\frac {3+m}{2},-\frac {b x^2}{a}\right )}{a b^2 (1+m)} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {472, 371} \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {x^{m+1} (b c-a d)^2 \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-\frac {b x^2}{a}\right )}{a b^2 (m+1)}+\frac {d x^{m+1} (2 b c-a d)}{b^2 (m+1)}+\frac {d^2 x^{m+3}}{b (m+3)} \]
[In]
[Out]
Rule 371
Rule 472
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {d (2 b c-a d) x^m}{b^2}+\frac {d^2 x^{2+m}}{b}+\frac {\left (b^2 c^2-2 a b c d+a^2 d^2\right ) x^m}{b^2 \left (a+b x^2\right )}\right ) \, dx \\ & = \frac {d (2 b c-a d) x^{1+m}}{b^2 (1+m)}+\frac {d^2 x^{3+m}}{b (3+m)}+\frac {(b c-a d)^2 \int \frac {x^m}{a+b x^2} \, dx}{b^2} \\ & = \frac {d (2 b c-a d) x^{1+m}}{b^2 (1+m)}+\frac {d^2 x^{3+m}}{b (3+m)}+\frac {(b c-a d)^2 x^{1+m} \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\frac {b x^2}{a}\right )}{a b^2 (1+m)} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 5 in optimal.
Time = 0.34 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.90 \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {x^{1+m} \left (c^2 \Phi \left (-\frac {b x^2}{a},1,\frac {1+m}{2}\right )+d x^2 \left (2 c \Phi \left (-\frac {b x^2}{a},1,\frac {3+m}{2}\right )+d x^2 \Phi \left (-\frac {b x^2}{a},1,\frac {5+m}{2}\right )\right )\right )}{2 a} \]
[In]
[Out]
\[\int \frac {x^{m} \left (d \,x^{2}+c \right )^{2}}{b \,x^{2}+a}d x\]
[In]
[Out]
\[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int { \frac {{\left (d x^{2} + c\right )}^{2} x^{m}}{b x^{2} + a} \,d x } \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 3.02 (sec) , antiderivative size = 292, normalized size of antiderivative = 3.11 \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {c^{2} m x^{m + 1} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {1}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {1}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )} + \frac {c^{2} x^{m + 1} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {1}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {1}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )} + \frac {c d m x^{m + 3} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {3}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )}{2 a \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )} + \frac {3 c d x^{m + 3} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {3}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )}{2 a \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )} + \frac {d^{2} m x^{m + 5} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {5}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {7}{2}\right )} + \frac {5 d^{2} x^{m + 5} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {5}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {7}{2}\right )} \]
[In]
[Out]
\[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int { \frac {{\left (d x^{2} + c\right )}^{2} x^{m}}{b x^{2} + a} \,d x } \]
[In]
[Out]
\[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int { \frac {{\left (d x^{2} + c\right )}^{2} x^{m}}{b x^{2} + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int \frac {x^m\,{\left (d\,x^2+c\right )}^2}{b\,x^2+a} \,d x \]
[In]
[Out]